﻿using UnityEngine;

public class CameraFollow : MonoBehaviour {

    public GameObject Player;
	// Use this for initialization
	void Start () {
        Player = GameObject.FindWithTag("Player");
        //固定摄像机的角度
        this.gameObject.transform.rotation = Quaternion.Euler(new Vector3(20, -30, 0));
	}
	
	// Update is called once per frame
	void Update () {
        //摄像机跟随
        Vector3 v3 = Player.transform.position + new Vector3(3.2f,3.2f,-6.13f);
        this.gameObject.transform.position = Vector3.Lerp(this.gameObject.transform.position,v3,Time.deltaTime*5);
    
	}
}
